<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org/">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>天天生鲜-首页</title>
	<link rel="stylesheet" type="text/css" href="/css/reset.css">
	<link rel="stylesheet" type="text/css" href="/css/main.css">

	<link rel="stylesheet" href="/css/iconfont.css">
	<!--<link rel="stylesheet" href="/css/General style.css">-->
	<link rel="stylesheet" href="/css/header.css">
	<link rel="stylesheet" href="/css/slideshow.css">
	<link rel="stylesheet" href="/css/home-hero.css">
	<link rel="stylesheet" href="/css/home-main.css">
	<link rel="stylesheet" href="/css/footer.css">

	<link rel="stylesheet" type="text/css" href="/layui/css/layui.css">


	<!-- 根据窗口大小动态的改变工具栏的样式，以及大小 -->
	<!--<link rel="stylesheet" href="/css/subbar.css" media="all and (max-width:1499.99999px)">   &lt;!&ndash; 媒体查询1 &ndash;&gt;
	<link rel="stylesheet" href="/css/subbar2.css" media="all and (min-width:1500px)">  &lt;!&ndash; 媒体查询2 &ndash;&gt;-->
	<style>
		/* .submenu 基础样式 */
		.submenu {
			display: none; /* 默认不显示，通过JS控制显示 */
			position: absolute; /* 相对定位以确保悬浮显示 */
			left: 100%; /* 确保子菜单在父级菜单的右侧 */
			top: 0; /* 确保子菜单与父级菜单顶部对齐 */
			width: 200px; /* 设置一个固定宽度 */
			background-color: #f9f9f9;
			border: 1px solid #ccc;
			box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2); /* 添加阴影效果 */
			z-index: 1000; /* 确保子菜单在其他内容之上 */
			padding: 10px; /* 添加内边距 */
		}

		/* 悬浮显示子菜单 */
		.subnav li:hover .submenu {
			display: block; /* 鼠标悬停时显示子菜单 */
		}

		/* .submenu 内的每个 li */
		.submenu li {
			display: block;
			clear: both; /* 确保每个 li 都清除浮动 */
			margin: 5px 0; /* 添加外边距以避免重叠 */
		}

		/* 链接样式 */
		.submenu li a {
			color: black;
			padding: 12px 16px; /* 增加填充使链接更易点击 */
			text-decoration: none;
			display: block;
			white-space: nowrap; /* 防止文本换行 */
			overflow: hidden; /* 防止内容溢出 */
			text-overflow: ellipsis; /* 溢出时显示省略号 */
		}

		/* 鼠标悬停效果 */
		.submenu li a:hover {
			background-color: #ddd; /* 鼠标悬停时的背景颜色 */
		}

		/* 图片与文本的布局 */
		.submenu li a img {
			vertical-align: middle; /* 垂直对齐 */
			margin-right: 10px; /* 图片和文本之间的间距 */
		}

		/* 追加：确保父级 .category-list 有相对定位 */
		.category-list {
			position: relative; /* 确保子菜单相对于父级菜单进行定位 */
		}

	</style>
</head>
<body>

	<div class="header_con">
		<div th:replace="header::top1"></div>
	</div>

	<div th:replace="search::top2"></div>


	<div class="navbar_con">
		<div class="navbar">
			<h1 class="fl">全部商品分类</h1>
			<ul class="navlist fl">
				<li><a href="/">首页</a></li>
				<li class="interval">|</li>
				<li><a href="">手机生鲜</a></li>
				<li class="interval">|</li>
				<li><a href="">抽奖</a></li>
			</ul>
		</div>
	</div>

	<div class="center_con clearfix">
		<ul class="subnav fl" id="categoryList">
		</ul>
		<!--<ul class="cat-ul subnav fl">
			<li class="category-list">
				<a href="#" class="fruit">新鲜水果</a>
			</li>
			<li><a href="#" class="seafood">海鲜水产</a></li>
			<li><a href="#" class="meet">猪牛羊肉</a></li>
			<li><a href="#" class="egg">禽类蛋品</a></li>
			<li><a href="#" class="vegetables">新鲜蔬菜</a></li>
			<li><a href="#" class="ice">速冻食品</a></li>
		</ul>-->
		<div class="slide fl">
			<ul class="slide_pics">
				<li><img src="/images/slide.jpg" alt="幻灯片"></li>
				<li><img src="/images/slide02.jpg" alt="幻灯片"></li>
				<li><img src="/images/slide03.jpg" alt="幻灯片"></li>
				<li><img src="/images/slide04.jpg" alt="幻灯片"></li>
			</ul>
			<div class="prev"></div>
			<div class="next"></div>
			<ul class="points"></ul>
		</div>
		<div class="adv fl">
			<a href="#"><img src="/images/adv01.jpg"></a>
			<a href="#"><img src="/images/adv02.jpg"></a>
		</div>
	</div>

	<div class="list_model">
		<div class="list_title clearfix">
			<h3 class="fl" id="model01">新鲜水果</h3>
			<div class="subtitle fl">
				<span>|</span>
				<a href="#">鲜芒</a>
				<a href="#">加州提子</a>
				<a href="#">亚马逊牛油果</a>
			</div>
			<a href="/page/product/list?id=100008" class="goods_more fr" id="fruit_more">查看更多 ></a>
		</div>

		<div class="goods_con clearfix">
			<div class="goods_banner fl"><img src="/images/banner01.jpg"></div>
			<ul class="goods_list fl">
				<li>
					<h4><a href="#">草莓</a></h4>
					<a href="#"><img src="/images/goods/goods003.jpg"></a>
					<div class="prize">¥ 30.00</div>
				</li>
				<li>
					<h4><a href="#">葡萄</a></h4>
					<a href="#"><img src="/images/goods/goods002.jpg"></a>
					<div class="prize">¥ 5.50</div>
				</li>
				<li>
					<h4><a href="#">柠檬</a></h4>
					<a href="#"><img src="/images/goods/goods001.jpg"></a>
					<div class="prize">¥ 3.90</div>
				</li>
				<li>
					<h4><a href="#">奇异果</a></h4>
					<a href="#"><img src="/images/goods/goods012.jpg"></a>
					<div class="prize">¥ 25.80</div>
				</li>
			</ul>
		</div>
	</div>

	<div class="list_model">
		<div class="list_title clearfix">
			<h3 class="fl" id="model02">海鲜水产</h3>
			<div class="subtitle fl">
				<span>|</span>
				<a href="#">河虾</a>
				<a href="#">扇贝</a>				
			</div>
			<a href="#" class="goods_more fr">查看更多 ></a>
		</div>

		<div class="goods_con clearfix">
			<div class="goods_banner fl"><img src="/images/banner02.jpg"></div>
			<ul class="goods_list fl">
				<li>
					<h4><a href="#">青岛野生海捕大青虾</a></h4>
					<a href="#"><img src="/images/goods/goods018.jpg"></a>
					<div class="prize">¥ 48.00</div>
				</li>
				<li>
					<h4><a href="#">扇贝</a></h4>
					<a href="#"><img src="/images/goods/goods019.jpg"></a>
					<div class="prize">¥ 46.00</div>
				</li>
				<li>
					<h4><a href="#">冷冻秋刀鱼</a></h4>
					<a href="#"><img src="/images/goods/goods020.jpg"></a>
					<div class="prize">¥ 19.00</div>
				</li>
				<li>
					<h4><a href="#">基围虾</a></h4>
					<a href="#"><img src="/images/goods/goods021.jpg"></a>
					<div class="prize">¥ 25.00</div>
				</li>
			</ul>
		</div>
	</div>

	<div class="list_model">
		<div class="list_title clearfix">
			<h3 class="fl" id="model03">猪牛羊肉</h3>
			<div class="subtitle fl">
				<span>|</span>
				<a href="#">鲜芒</a>
				<a href="#">加州提子</a>
				<a href="#">亚马逊牛油果</a>
			</div>
			<a href="#" class="goods_more fr">查看更多 ></a>
		</div>

		<div class="goods_con clearfix">
			<div class="goods_banner fl"><img src="/images/banner03.jpg"></div>
			<ul class="goods_list fl">
				<li>
					<h4><a href="#">维多利亚葡萄维多利亚葡萄维多利亚葡萄维多利亚葡萄</a></h4>
					<a href="#"><img src="/images/goods.jpg"></a>
					<div class="prize">¥ 38.00</div>
				</li>
				<li>
					<h4><a href="#">维多利亚葡萄</a></h4>
					<a href="#"><img src="/images/goods.jpg"></a>
					<div class="prize">¥ 38.00</div>
				</li>
				<li>
					<h4><a href="#">维多利亚葡萄</a></h4>
					<a href="#"><img src="/images/goods.jpg"></a>
					<div class="prize">¥ 38.00</div>
				</li>
				<li>
					<h4><a href="#">维多利亚葡萄</a></h4>
					<a href="#"><img src="/images/goods.jpg"></a>
					<div class="prize">¥ 38.00</div>
				</li>
			</ul>
		</div>
	</div>

	<div class="list_model">
		<div class="list_title clearfix">
			<h3 class="fl" id="model04">禽类蛋品</h3>
			<div class="subtitle fl">
				<span>|</span>
				<a href="#">鲜芒</a>
				<a href="#">加州提子</a>
				<a href="#">亚马逊牛油果</a>
			</div>
			<a href="#" class="goods_more fr">查看更多 ></a>
		</div>

		<div class="goods_con clearfix">
			<div class="goods_banner fl"><img src="/images/banner04.jpg"></div>
			<ul class="goods_list fl">
				<li>
					<h4><a href="#">维多利亚葡萄维多利亚葡萄维多利亚葡萄维多利亚葡萄</a></h4>
					<a href="#"><img src="/images/goods.jpg"></a>
					<div class="prize">¥ 38.00</div>
				</li>
				<li>
					<h4><a href="#">维多利亚葡萄</a></h4>
					<a href="#"><img src="/images/goods.jpg"></a>
					<div class="prize">¥ 38.00</div>
				</li>
				<li>
					<h4><a href="#">维多利亚葡萄</a></h4>
					<a href="#"><img src="/images/goods.jpg"></a>
					<div class="prize">¥ 38.00</div>
				</li>
				<li>
					<h4><a href="#">维多利亚葡萄</a></h4>
					<a href="#"><img src="/images/goods.jpg"></a>
					<div class="prize">¥ 38.00</div>
				</li>
			</ul>
		</div>
	</div>

	<div class="list_model">
		<div class="list_title clearfix">
			<h3 class="fl" id="model05">新鲜蔬菜</h3>
			<div class="subtitle fl">
				<span>|</span>
				<a href="#">鲜芒</a>
				<a href="#">加州提子</a>
				<a href="#">亚马逊牛油果</a>
			</div>
			<a href="#" class="goods_more fr">查看更多 ></a>
		</div>

		<div class="goods_con clearfix">
			<div class="goods_banner fl"><img src="/images/banner05.jpg"></div>
			<ul class="goods_list fl">
				<li>
					<h4><a href="#">维多利亚葡萄维多利亚葡萄维多利亚葡萄维多利亚葡萄</a></h4>
					<a href="#"><img src="/images/goods.jpg"></a>
					<div class="prize">¥ 38.00</div>
				</li>
				<li>
					<h4><a href="#">维多利亚葡萄</a></h4>
					<a href="#"><img src="/images/goods.jpg"></a>
					<div class="prize">¥ 38.00</div>
				</li>
				<li>
					<h4><a href="#">维多利亚葡萄</a></h4>
					<a href="#"><img src="/images/goods.jpg"></a>
					<div class="prize">¥ 38.00</div>
				</li>
				<li>
					<h4><a href="#">维多利亚葡萄</a></h4>
					<a href="#"><img src="/images/goods.jpg"></a>
					<div class="prize">¥ 38.00</div>
				</li>
			</ul>
		</div>
	</div>

	<div class="list_model">
		<div class="list_title clearfix">
			<h3 class="fl" id="model06">速冻食品</h3>
			<div class="subtitle fl">
				<span>|</span>
				<a href="#">鲜芒</a>
				<a href="#">加州提子</a>
				<a href="#">亚马逊牛油果</a>
			</div>
			<a href="#" class="goods_more fr">查看更多 ></a>
		</div>

		<div class="goods_con clearfix">
			<div class="goods_banner fl"><img src="/images/banner06.jpg"></div>
			<ul class="goods_list fl">
				<li>
					<h4><a href="#">维多利亚葡萄维多利亚葡萄维多利亚葡萄维多利亚葡萄</a></h4>
					<a href="#"><img src="/images/goods.jpg"></a>
					<div class="prize">¥ 38.00</div>
				</li>
				<li>
					<h4><a href="#">维多利亚葡萄</a></h4>
					<a href="#"><img src="/images/goods.jpg"></a>
					<div class="prize">¥ 38.00</div>
				</li>
				<li>
					<h4><a href="#">维多利亚葡萄</a></h4>
					<a href="#"><img src="/images/goods.jpg"></a>
					<div class="prize">¥ 38.00</div>
				</li>
				<li>
					<h4><a href="#">维多利亚葡萄</a></h4>
					<a href="#"><img src="/images/goods.jpg"></a>
					<div class="prize">¥ 38.00</div>
				</li>
			</ul>
		</div>
	</div>

	<div class="footer">
		<div class="foot_link">
			<a href="#">关于我们</a>
			<span>|</span>
			<a href="#">联系我们</a>
			<span>|</span>
			<a href="#">招聘人才</a>
			<span>|</span>
			<a href="#">友情链接</a>		
		</div>
		<p>CopyRight © 2016 北京天天生鲜信息技术有限公司 All Rights Reserved</p>
		<p>电话：010-****888    京ICP备*******8号</p>
	</div>

<!--	<script type="text/javascript" src="/js/jquery-1.12.4.min.js"></script>
	<script type="text/javascript" src="/js/jquery-ui.min.js"></script>
	<script type="text/javascript" src="/js/slide.js"></script>-->

	<script src="/js/slideshow.js"></script>
	<script src="/js/tab.js"></script>
	<script src="/jquery-2.1.4.js"></script>
	<script src="/layui/layui.js"></script>
	<script src="/mylayer.js"></script>

	<script src="/js/index.js"></script>
	<!--<script type="text/javascript">
		BCSlideshow('focuspic');
		var oFruit = document.getElementById('fruit_more');
		var oShownum = document.getElementById('show_count');

		var hasorder = localStorage.getItem('order_finish');

		if(hasorder)
		{
			oShownum.innerHTML = '2';
		}

		oFruit.onclick = function(){
			window.location.href = 'list.html';
		}
	</script>-->

	<script>
		layui.use([], function () {
			$.post(
				'/category/listAll',
				function (result) {
					console.log(result);
					if (result.code == 0) {
						var html = '';
						$(result.data).each(function () {
							html += '<li class="category-list">'
							html += '    <a href="#" class="' + this.clazz + '">'
							html += '        ' + this.name + ''
							html += '    </a>'
							html += '    <div class="commodity clearfix comm-3 sub_categories">'
							html += '        <ul class="submenu">'
							$(this.childList).each(function () {
								html += '            <li class="com-li">'
								html += '                <a href="/page/product/list?id=' + this.id + '" class="link clearfix">'
								html += '                        <span class="text">' + this.name + '</span>'
								html += '                </a>'
								html += '            </li>'
							})
							html += '        </ul>'
							html += '    </div>'
							html += '</li>'
						});
						$('#categoryList').append(html);

					}
				},
				'json'
			)
		});

	</script>
</body>
</html>